import request from '@/utils/request'

// 查询常驻车辆列表
export function listPermanentCar(query) {
  return request({
    url: '/zhmk/permanentCar/list',
    method: 'get',
    params: query
  })
}

// 查询常驻车辆详细
export function getPermanentCar(id) {
  return request({
    url: '/zhmk/permanentCar/' + id,
    method: 'get'
  })
}

// 新增常驻车辆
export function addPermanentCar(data) {
  return request({
    url: '/zhmk/permanentCar',
    method: 'post',
    data: data
  })
}

// 修改常驻车辆
export function updatePermanentCar(data) {
  return request({
    url: '/zhmk/permanentCar',
    method: 'put',
    data: data
  })
}

// 删除常驻车辆
export function delPermanentCar(id) {
  return request({
    url: '/zhmk/permanentCar/' + id,
    method: 'delete'
  })
}

// 导出常驻车辆
export function exportPermanentCar(query) {
  return request({
    url: '/zhmk/permanentCar/export',
    method: 'get',
    params: query
  })
}

// 下发
export function carSend(data) {
  return request({
    url: '/zhmk/permanentCar/carSend',
    method: 'post',
    data: data
  })
}

// 查询全部设备
export function findAll() {
  return request({
    url: '/zhmk/device/findAll',
    method: 'get'
  })
}